package com.jnu.assistant.mapper;

import com.jnu.assistant.pojo.UserOpenId;
import org.apache.ibatis.annotations.*;

@Mapper
public interface LoginMapper {
    @Select("select userId from user where openId=#{openid}")
    Integer getUserId(String openid);

    @Insert("INSERT INTO user(openId) VALUES(#{openId})")
    @Options(useGeneratedKeys = true, keyProperty = "userId", keyColumn = "userId")
    void insertId(UserOpenId userOpenId);
}
